<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <!-- style也可以写对象类型，key表示的是css的属性，value表示变量或者表达式 -->
      <!-- key如果出现了连字符，可以使用引号或者小驼峰 -->
      <p
        :style="{color: color, 'font-size': size + 'px', transform: 'translate(' + tsl + 'px)'}"
      >
        style绑定
      </p>
      <!-- <button v-on:click="size += 2">btn</button> -->
      <button v-on:click="tsl += 10">btn</button>
    </div>

    <script src="./Vue3.js"></script>
    <script>
      const { createApp } = Vue;

      createApp({
        data() {
          return {
            color: "blue",
            size: 16,
            tsl: 10,
          };
        },
      }).mount("#app");
    </script>
  </body>
</html>
